/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import java.awt.*;
import org.jdesktop.application.SingleFrameApplication;

/**
 *
 * @author Dang Nhung
 */
public class MainForm extends javax.swing.JPanel {
    SingleFrameApplication localApplication;
    /**
     * Creates new form MainForm
     */
    public MainForm(SingleFrameApplication app) {
        this.localApplication = app;
        initComponents();
        this.setLayout(new BorderLayout());
//        Toolkit tk=Toolkit.getDefaultToolkit();
//        int xSize=((int)tk.getScreenSize().getWidth());
//        int ySize=((int)tk.getScreenSize().getHeight());
//        this.setSize(xSize,ySize);

//        int xSizePhay=(int)xSize/5;
//        int xsize2phay=xSize-xSizePhay;
//        int ysizePhay=(int)ySize-250;

        ///////////// Header 
//        JPanel jpn_header = new JPanel();
//        jpn_header.setBorder(new EtchedBorder(EtchedBorder.RAISED));
//        jpn_header.setPreferredSize(new Dimension(xSize, 150));
//        this.add(jpn_header, BorderLayout.NORTH);

        ///////////// LeftPanel      
//        JPanel jpn_left = new JPanel();
//        jpn_left.setBorder(new EtchedBorder(EtchedBorder.RAISED));
//        jpn_left.setPreferredSize(new Dimension(xSizePhay, ysizePhay));
//        this.add(jpn_left, BorderLayout.WEST);

        ///////////// RightPanel
//        JPanel jpn_right = new JPanel();
//        jpn_right.setBorder(new EtchedBorder(EtchedBorder.RAISED));
//        jpn_right.setPreferredSize(new Dimension(xsize2phay, ysizePhay));
//        jpn_right.setLayout(new BorderLayout());
//        this.add(jpn_right, BorderLayout.CENTER);

        ///////////// Footer
//        JPanel jpn_footer = new JPanel();
//        jpn_footer.setBorder(new EtchedBorder(EtchedBorder.RAISED));
//        jpn_footer.setPreferredSize(new Dimension(xSize, 100));
//        jpn_footer.setLayout(new BorderLayout());
//        this.add(jpn_footer, BorderLayout.SOUTH);

        ////////////TopChildFooter
//        JPanel jpn_topchildfooter = new JPanel();
//        jpn_topchildfooter.setBorder(new EtchedBorder(EtchedBorder.RAISED));
//        jpn_topchildfooter.setPreferredSize(new Dimension(xSize, 70));
//        jpn_footer.add(jpn_topchildfooter, BorderLayout.NORTH);

        ///////////BottomChildFooter
//        JPanel jpn_bottomchildfooter = new JPanel();
//        jpn_bottomchildfooter.setBorder(new EtchedBorder(EtchedBorder.RAISED));
//        jpn_bottomchildfooter.setPreferredSize(new Dimension(xSize, 30));
//        jpn_footer.add(jpn_bottomchildfooter, BorderLayout.SOUTH);


        // Default leftpanel

        // ###########################################################
        // Author hmtuan
        // Updated Date 16/04/2012
        // Adding LeftPanel_Staff into LeftPanel, set jpn_right to bind appropriate component
        // ###########################################################
//        jpn_left.add(new LeftPanel_Admin(this.localApplication, jpn_right));
//        jpn_left.setSize(xSizePhay,ysizePhay);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        setPreferredSize(new java.awt.Dimension(150, 150));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables
}
